/*
 * Copyright (C) 2010 Seapeak.Xu
 *
 * fostmq may be copied only under the terms of the GNU General
 * Public License V3, which may be found in the fostmq source kit.
 *
 * Created on: 2010-7-30
 * Author: Seapeak.Xu
 */

#ifndef FOST_IO_H
#define FOST_IO_H
#ifdef __cplusplus
extern "C"
{
#endif

#include <stdio.h>
#include <stdlib.h>

/*
 *check the path is directory.
 *if the path is directory return 0 else return -1,if error return -1;
 */
int is_dir(const char *path);

/*
 *cascade create directory
 *if create success return 0,else return -1,if error return -1;
 */
int mkdir_cascading(const char *path, mode_t mode);

int fill_file(const char *filepath,const char *format,...);

#ifdef __cplusplus
}
#endif
#endif /* FOST_IO_H */
